.bidInfo(ng-if="!vm.state.bid4freeWorkspace")
	// Sub Contractor
	.bidInfoSubContractor(ng-if="vm.userIsASubContractor" layout="column" layout-align="space-between")
		div(layout="row" flex="45" layout-align="space-between")
			bid-project-summary(layout="column" flex="30")
			bid-summary(layout="column" flex="30" on-select-package="vm.selectPackage(packageName)")
			bid-status(layout="column" flex="30" package-name="vm.selectedPackageName" on-invite-accepted="vm.inviteAccepted()")


		div(layout="row" flex="45" layout-align="space-between")
			bid-image(layout="column" flex="30" account="vm.account" project="vm.project")
			bid-docs(layout="column" flex="30" package-name="vm.selectedPackageName" invite-accepted="vm.packageInviteAccepted")
			bid-workspace(layout="column" flex="30" package-name="vm.selectedPackageName" invite-accepted="vm.packageInviteAccepted" account="vm.account" project="vm.project")

	// Main Contractor
	.bidContent(layout="row" layout-align="space-between" ng-if="vm.userIsAMainContractor" flex layout-fill)
		// Project Summary
		.md-whiteframe-1dp(flex=25 layout="column")
			md-toolbar
				.md-toolbar-tools
					h2 Project Summary
			.packageContent
				md-content
					.projectSummaryInput(ng-if="vm.showProjectSummaryInput")
						span(ng-repeat="input in vm.projectSummary")
							md-input-container.md-block(ng-if="input.type==='input'")
								label {{input.label}}
								input(required name="name" ng-model="input.value")
							.bidDatePicker(ng-if="input.type==='date'")
								h5 {{input.label}}
								md-datepicker(ng-model="input.value", md-placeholder="Enter date")
						md-divider
						div(layout="row", layout-align="center center")
							md-button.md-accent(ng-click="vm.saveProjectSummary()", ng-disabled="vm.saveProjectSummaryDisabled") Save

					div(ng-if="!vm.showProjectSummaryInput")
						md-list
							md-list-item.md-2-line
								.md-list-item-text
									h3 Site
									p {{vm.projectSummary.site.value}}
							md-list-item.md-2-line
								.md-list-item-text
									h3 Name
									p {{vm.projectSummary.name.value}}
							md-list-item.md-2-line
								.md-list-item-text
									h3 Site
									p {{vm.projectSummary.site.value}}
							md-list-item.md-2-line
								.md-list-item-text
									h3 Code
									p {{vm.projectSummary.code.value}}
							md-list-item.md-2-line
								.md-list-item-text
									h3 Client
									p {{vm.projectSummary.client.value}}
							md-list-item.md-2-line
								.md-list-item-text
									h3 Budget
									p {{vm.projectSummary.budget.value}}
							md-list-item.md-2-line
								.md-list-item-text
									h3 Completed by
									p {{vm.projectSummary.completedByPretty}}

		// Package List
		.bidPackageList.md-whiteframe-1dp(flex=20)
			md-toolbar
				.md-toolbar-tools
					h2 {{vm.listTitle}}
					span(flex)
					md-button.md-icon-button(aria-label="Add Package", ng-click="vm.setupAddPackage()")
						md-icon(class="fa fa-plus")
			.packageContent
				md-content
					md-list
						md-list-item(
							ng-repeat="package in vm.packages"
							ng-click="vm.showPackage($index)"
							aria-label="Package")
							p {{package.name}}

		// Package Summary
		.bidSummary.md-whiteframe-1dp(flex=25 layout="column")
			md-toolbar
				.md-toolbar-tools
					h2 Package Summary
			.packageContent
				md-content
					div(ng-if="vm.packageSelected")
						.packageSummaryInput(ng-if="vm.showInput")
							span(ng-repeat="input in vm.packageSummary")
								md-input-container.md-block(ng-if="input.type==='input'")
									label {{input.label}}
									input(required name="name" ng-model="input.value")
								.bidDatePicker(ng-if="input.type==='date'")
									h5 {{input.label}}
									md-datepicker(ng-model="input.value", md-placeholder="Enter date")
							md-divider
							div(layout="row", layout-align="center center")
								md-button.md-accent(ng-click="vm.savePackage()", ng-disabled="vm.savePackageDisabled") Save
						.cardInfo(ng-if="vm.showInfo")
								p {{vm.info}}

						div(ng-if="vm.showSummary", layout="column")
							//div(style="background:green; height:500px; overflow:auto", flex="50", layout="column")
							md-list.packageSummaryList(flex="40", layout="column")
								md-list-item.md-2-line
									.md-list-item-text
										h3 Name
										p {{vm.selectedPackage.name}}
								md-list-item.md-2-line
									.md-list-item-text
										h3 Site
										p {{vm.selectedPackage.site}}
								md-list-item.md-2-line
									.md-list-item-text
										h3 Code
										p {{vm.selectedPackage.code}}
								md-list-item.md-2-line
									.md-list-item-text
										h3 Budget
										p {{vm.selectedPackage.budget}}
								md-list-item.md-2-line
									.md-list-item-text
										h3 Area
										p {{vm.selectedPackage.area}}
								md-list-item.md-2-line
									.md-list-item-text
										h3 Contact
										p {{vm.selectedPackage.contact}}
								md-list-item.md-2-line
									.md-list-item-text
										h3 Completed by
										p {{vm.selectedPackage.completedByPretty}}
							md-divider
							.fileUploader(flex="50", layout="column")
								p File upload
								input(type="file", id="fileUploader", multiple="multiple")
								.cardInfo(ng-if="vm.showFileUploadedInfo")
									p Uploaded {{vm.uploadedFilename}}

					div(ng-if="!vm.packageSelected")
						.cardInfo
							p {{vm.summaryInfo}}

		// Package Invite
		.bidInvite.md-whiteframe-1dp(flex=25)
			md-toolbar
				.md-toolbar-tools
					h2
						span Sub Contractors
			.packageContent.packageInvite
				md-content
					div(ng-if="vm.packageSelected")
						div(ng-if="!vm.showInput")
							// Not invited selection
							div(layout="row", layout-align="center center", ng-if="vm.packageNotAwarded")
								md-input-container.md-block(flex="80")
									label Select Sub Contractor
									md-select(ng-model="vm.subContractorUser")
										md-option(ng-repeat="subContractor in vm.notInvitedSubContractors", value="{{subContractor.user}}")
											| {{subContractor.user}}
								md-button.md-accent(ng-click="vm.inviteSubContractor()", ng-disabled="vm.addSubContractorDisabled") Invite

							// Invited list
							div(ng-if="vm.subContractorsInvited")
								md-subheader.md-no-sticky Invited
								md-list-item(ng-repeat="invited in vm.invitedSubContractors")
									md-icon.bidInviteIcon(flex="5", ng-class="invited.invitedIcon")
									p(flex="30") {{invited.user}}
									span(flex="10")
										md-button.md-accent(ng-if="invited.accepted && !vm.awarded", ng-click="vm.awardToSubContractor($index)") Award
							div(ng-if="!vm.subContractorsInvited")
								.cardInfo
									p There are currently no sub contractors invited

						div(ng-if="vm.showInput")
							.cardInfo
								p {{vm.statusInfo}}

					div(ng-if="!vm.packageSelected")
						.cardInfo
							p {{vm.statusInfo}}

div(ng-if="vm.state.bid4freeWorkspace" layout-fill)
	bid4free-workspace(package-name="vm.selectedPackageName" account="vm.account" project="vm.project" branch="vm.branch" revision="vm.revision")